/*
*资产配置模拟
**/
import React, {Component,PropTypes} from 'react';
import {connect} from 'dva';
import {routerRedux,withRouter } from 'dva/router';
import { Card,Collapse  } from 'antd';
import Tabtitle from '../../components/common/TabTitle';
import {SchemeTotalTable} from './ConfigurationSchemeConstruction/component/SchemeTable';
import AddScheme from './ConfigurationSchemeConstruction/component/AddScheme';
import ModelSelect from './ConfigurationSimulation/component/ModelSelect';
import ModelParameterSetting from './ConfigurationSimulation/component/ModelParameterSetting';


const AssetConfigSimulation = ({dispatch,configSconst,configSimulation,location:{pathname,query}}) => {
	const {
		tableData,
		LargeAssetData,
		pdtList,
		isShowModel
	}=configSconst;
	const {
		isShowTable
	}=configSimulation
	console.log('AssetConfigSimulation>>',configSconst)
	return (
		<div>
			<Tabtitle value={'资产配置模拟'}/>
			<Card
			style={{border: 0,margin:'0 10px',borderRadius:2,padding:'20px 30px 0' }} 
			title="配置方案构建" >
				<AddScheme 
					LargeAssetData={LargeAssetData}
					pdtList={pdtList}
					title='新增'
				/>
		    <SchemeTotalTable
		    	data={tableData}
		    	LargeAssetData={LargeAssetData}
		    />
		  </Card>
		  <Card 
		  style={{border: 0,margin:'0 10px',borderRadius:2,paddingLeft:30,paddingRight:30 }} 
		  title="配置模拟" >
		  	<Card>
		  		{
		  			isShowModel?<div>
		  				<h3>模型选择：</h3>
		    			<ModelSelect/>
		  			</div>:null
		  		}
		  		{
		  			isShowTable?<div>
		  				<h3>模型参数设置：</h3>
		    			<ModelParameterSetting />
		  			</div>:null
		  		}
		  	</Card>
		    

		  </Card>
		</div>
			
	)
}

AssetConfigSimulation.propTypes = {}

export default connect(({configSconst,configSimulation})=>({configSconst,configSimulation}))(AssetConfigSimulation)
